3.1.17 \(\int \frac {\sqrt {g \sin (e+f x)}}{\sqrt {a+a \sin (e+f x)} (c-c \sin (e+f x))} \, dx\) [17]

3.1.17.1 Optimal result
3.1.17.2 Mathematica [A] (verified)
3.1.17.3 Rubi [A] (verified)
3.1.17.4 Maple [A] (verified)
3.1.17.5 Fricas [A] (verification not implemented)
3.1.17.6 Sympy [F]
3.1.17.7 Maxima [B] (verification not implemented)
3.1.17.8 Giac [F(-1)]
3.1.17.9 Mupad [F(-1)]

3.1.17.1 Optimal result

Integrand size = 40, antiderivative size = 114 \[ \int \frac {\sqrt {g \sin (e+f x)}}{\sqrt {a+a \sin (e+f x)} (c-c \sin (e+f x))} \, dx=\frac {\sqrt {g} \arctan \left (\frac {\sqrt {a} \sqrt {g} \cos (e+f x)}{\sqrt {2} \sqrt {g \sin (e+f x)} \sqrt {a+a \sin (e+f x)}}\right )}{\sqrt {2} \sqrt {a} c f}+\frac {\sec (e+f x) \sqrt {g \sin (e+f x)} \sqrt {a+a \sin (e+f x)}}{a c f} \]

output
1/2*arctan(1/2*cos(f*x+e)*a^(1/2)*g^(1/2)*2^(1/2)/(g*sin(f*x+e))^(1/2)/(a+ 
a*sin(f*x+e))^(1/2))*g^(1/2)/c/f*2^(1/2)/a^(1/2)+sec(f*x+e)*(g*sin(f*x+e)) 
^(1/2)*(a+a*sin(f*x+e))^(1/2)/a/c/f
 
3.1.17.2 Mathematica [A] (verified)

Time = 0.22 (sec) , antiderivative size = 133, normalized size of antiderivative = 1.17 \[ \int \frac {\sqrt {g \sin (e+f x)}}{\sqrt {a+a \sin (e+f x)} (c-c \sin (e+f x))} \, dx=\frac {\csc (2 (e+f x)) \sqrt {\sin (e+f x)} \sqrt {g \sin (e+f x)} \sqrt {a (1+\sin (e+f x))} \left (2 \sqrt {c} \sqrt {\sin (e+f x)}-\sqrt {2} \arctan \left (\frac {\sqrt {2} \sqrt {c} \sqrt {\sin (e+f x)}}{\sqrt {c-c \sin (e+f x)}}\right ) \sqrt {c-c \sin (e+f x)}\right )}{a c^{3/2} f} \]

input
Integrate[Sqrt[g*Sin[e + f*x]]/(Sqrt[a + a*Sin[e + f*x]]*(c - c*Sin[e + f* 
x])),x]
 
output
(Csc[2*(e + f*x)]*Sqrt[Sin[e + f*x]]*Sqrt[g*Sin[e + f*x]]*Sqrt[a*(1 + Sin[ 
e + f*x])]*(2*Sqrt[c]*Sqrt[Sin[e + f*x]] - Sqrt[2]*ArcTan[(Sqrt[2]*Sqrt[c] 
*Sqrt[Sin[e + f*x]])/Sqrt[c - c*Sin[e + f*x]]]*Sqrt[c - c*Sin[e + f*x]]))/ 
(a*c^(3/2)*f)
 
3.1.17.3 Rubi [A] (verified)

Time = 0.86 (sec) , antiderivative size = 114, normalized size of antiderivative = 1.00, number of steps used = 8, number of rules used = 7, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.175, Rules used = {3042, 3415, 3042, 3261, 218, 3409, 15}

Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.

\(\displaystyle \int \frac {\sqrt {g \sin (e+f x)}}{\sqrt {a \sin (e+f x)+a} (c-c \sin (e+f x))} \, dx\)

\(\Big \downarrow \) 3042

\(\displaystyle \int \frac {\sqrt {g \sin (e+f x)}}{\sqrt {a \sin (e+f x)+a} (c-c \sin (e+f x))}dx\)

\(\Big \downarrow \) 3415

\(\displaystyle \frac {g \int \frac {\sqrt {\sin (e+f x) a+a}}{\sqrt {g \sin (e+f x)} (c-c \sin (e+f x))}dx}{2 a}-\frac {g \int \frac {1}{\sqrt {g \sin (e+f x)} \sqrt {\sin (e+f x) a+a}}dx}{2 c}\)

\(\Big \downarrow \) 3042

\(\displaystyle \frac {g \int \frac {\sqrt {\sin (e+f x) a+a}}{\sqrt {g \sin (e+f x)} (c-c \sin (e+f x))}dx}{2 a}-\frac {g \int \frac {1}{\sqrt {g \sin (e+f x)} \sqrt {\sin (e+f x) a+a}}dx}{2 c}\)

\(\Big \downarrow \) 3261

\(\displaystyle \frac {a g \int \frac {1}{\frac {\cos (e+f x) \cot (e+f x) a^3}{\sin (e+f x) a+a}+2 a^2}d\frac {a \cos (e+f x)}{\sqrt {g \sin (e+f x)} \sqrt {\sin (e+f x) a+a}}}{c f}+\frac {g \int \frac {\sqrt {\sin (e+f x) a+a}}{\sqrt {g \sin (e+f x)} (c-c \sin (e+f x))}dx}{2 a}\)

\(\Big \downarrow \) 218

\(\displaystyle \frac {g \int \frac {\sqrt {\sin (e+f x) a+a}}{\sqrt {g \sin (e+f x)} (c-c \sin (e+f x))}dx}{2 a}+\frac {\sqrt {g} \arctan \left (\frac {\sqrt {a} \sqrt {g} \cos (e+f x)}{\sqrt {2} \sqrt {a \sin (e+f x)+a} \sqrt {g \sin (e+f x)}}\right )}{\sqrt {2} \sqrt {a} c f}\)

\(\Big \downarrow \) 3409

\(\displaystyle \frac {\sqrt {g} \arctan \left (\frac {\sqrt {a} \sqrt {g} \cos (e+f x)}{\sqrt {2} \sqrt {a \sin (e+f x)+a} \sqrt {g \sin (e+f x)}}\right )}{\sqrt {2} \sqrt {a} c f}-\frac {g \int \frac {\sec (e+f x) (\sin (e+f x) a+a) \tan (e+f x)}{a^2 c}d\frac {a \cos (e+f x)}{\sqrt {g \sin (e+f x)} \sqrt {\sin (e+f x) a+a}}}{f}\)

\(\Big \downarrow \) 15

\(\displaystyle \frac {\sqrt {g} \arctan \left (\frac {\sqrt {a} \sqrt {g} \cos (e+f x)}{\sqrt {2} \sqrt {a \sin (e+f x)+a} \sqrt {g \sin (e+f x)}}\right )}{\sqrt {2} \sqrt {a} c f}+\frac {\sec (e+f x) \sqrt {a \sin (e+f x)+a} \sqrt {g \sin (e+f x)}}{a c f}\)

input
Int[Sqrt[g*Sin[e + f*x]]/(Sqrt[a + a*Sin[e + f*x]]*(c - c*Sin[e + f*x])),x 
]
 
output
(Sqrt[g]*ArcTan[(Sqrt[a]*Sqrt[g]*Cos[e + f*x])/(Sqrt[2]*Sqrt[g*Sin[e + f*x 
]]*Sqrt[a + a*Sin[e + f*x]])])/(Sqrt[2]*Sqrt[a]*c*f) + (Sec[e + f*x]*Sqrt[ 
g*Sin[e + f*x]]*Sqrt[a + a*Sin[e + f*x]])/(a*c*f)
 

3.1.17.3.1 Defintions of rubi rules used

rule 15
Int[(a_.)*(x_)^(m_.), x_Symbol] :> Simp[a*(x^(m + 1)/(m + 1)), x] /; FreeQ[ 
{a, m}, x] && NeQ[m, -1]
 

rule 218
Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(Rt[a/b, 2]/a)*ArcTan[x/R 
t[a/b, 2]], x] /; FreeQ[{a, b}, x] && PosQ[a/b]
 

rule 3042
Int[u_, x_Symbol] :> Int[DeactivateTrig[u, x], x] /; FunctionOfTrigOfLinear 
Q[u, x]
 

rule 3261
Int[1/(Sqrt[(a_) + (b_.)*sin[(e_.) + (f_.)*(x_)]]*Sqrt[(c_.) + (d_.)*sin[(e 
_.) + (f_.)*(x_)]]), x_Symbol] :> Simp[-2*(a/f)   Subst[Int[1/(2*b^2 - (a*c 
 - b*d)*x^2), x], x, b*(Cos[e + f*x]/(Sqrt[a + b*Sin[e + f*x]]*Sqrt[c + d*S 
in[e + f*x]]))], x] /; FreeQ[{a, b, c, d, e, f}, x] && NeQ[b*c - a*d, 0] && 
 EqQ[a^2 - b^2, 0] && NeQ[c^2 - d^2, 0]
 

rule 3409
Int[Sqrt[(a_) + (b_.)*sin[(e_.) + (f_.)*(x_)]]/(Sqrt[(g_.)*sin[(e_.) + (f_. 
)*(x_)]]*((c_) + (d_.)*sin[(e_.) + (f_.)*(x_)])), x_Symbol] :> Simp[-2*(b/f 
)   Subst[Int[1/(b*c + a*d + c*g*x^2), x], x, b*(Cos[e + f*x]/(Sqrt[g*Sin[e 
 + f*x]]*Sqrt[a + b*Sin[e + f*x]]))], x] /; FreeQ[{a, b, c, d, e, f, g}, x] 
 && NeQ[b*c - a*d, 0] && EqQ[a^2 - b^2, 0]
 

rule 3415
Int[Sqrt[(g_.)*sin[(e_.) + (f_.)*(x_)]]/(Sqrt[(a_) + (b_.)*sin[(e_.) + (f_. 
)*(x_)]]*((c_) + (d_.)*sin[(e_.) + (f_.)*(x_)])), x_Symbol] :> Simp[(-a)*(g 
/(b*c - a*d))   Int[1/(Sqrt[g*Sin[e + f*x]]*Sqrt[a + b*Sin[e + f*x]]), x], 
x] + Simp[c*(g/(b*c - a*d))   Int[Sqrt[a + b*Sin[e + f*x]]/(Sqrt[g*Sin[e + 
f*x]]*(c + d*Sin[e + f*x])), x], x] /; FreeQ[{a, b, c, d, e, f, g}, x] && N 
eQ[b*c - a*d, 0] && (EqQ[a^2 - b^2, 0] || EqQ[c^2 - d^2, 0])
 
3.1.17.4 Maple [A] (verified)

Time = 3.34 (sec) , antiderivative size = 158, normalized size of antiderivative = 1.39

method result size
default \(-\frac {\left (\sqrt {\csc \left (f x +e \right )-\cot \left (f x +e \right )}\, \sin \left (f x +e \right )-2 \arctan \left (\sqrt {\csc \left (f x +e \right )-\cot \left (f x +e \right )}\right ) \cos \left (f x +e \right )+\sqrt {\csc \left (f x +e \right )-\cot \left (f x +e \right )}\, \cos \left (f x +e \right )+\sqrt {\csc \left (f x +e \right )-\cot \left (f x +e \right )}\right ) \sqrt {g \sin \left (f x +e \right )}}{c f \left (-\cos \left (f x +e \right )+\sin \left (f x +e \right )-1\right ) \sqrt {a \left (1+\sin \left (f x +e \right )\right )}\, \sqrt {\csc \left (f x +e \right )-\cot \left (f x +e \right )}}\) \(158\)

input
int((g*sin(f*x+e))^(1/2)/(c-c*sin(f*x+e))/(a+a*sin(f*x+e))^(1/2),x,method= 
_RETURNVERBOSE)
 
output
-1/c/f*((csc(f*x+e)-cot(f*x+e))^(1/2)*sin(f*x+e)-2*arctan((csc(f*x+e)-cot( 
f*x+e))^(1/2))*cos(f*x+e)+(csc(f*x+e)-cot(f*x+e))^(1/2)*cos(f*x+e)+(csc(f* 
x+e)-cot(f*x+e))^(1/2))*(g*sin(f*x+e))^(1/2)/(-cos(f*x+e)+sin(f*x+e)-1)/(a 
*(1+sin(f*x+e)))^(1/2)/(csc(f*x+e)-cot(f*x+e))^(1/2)
 
3.1.17.5 Fricas [A] (verification not implemented)

Time = 0.36 (sec) , antiderivative size = 385, normalized size of antiderivative = 3.38 \[ \int \frac {\sqrt {g \sin (e+f x)}}{\sqrt {a+a \sin (e+f x)} (c-c \sin (e+f x))} \, dx=\left [\frac {\sqrt {2} a \sqrt {-\frac {g}{a}} \cos \left (f x + e\right ) \log \left (\frac {17 \, g \cos \left (f x + e\right )^{3} + 4 \, \sqrt {2} {\left (3 \, \cos \left (f x + e\right )^{2} + {\left (3 \, \cos \left (f x + e\right ) + 4\right )} \sin \left (f x + e\right ) - \cos \left (f x + e\right ) - 4\right )} \sqrt {a \sin \left (f x + e\right ) + a} \sqrt {g \sin \left (f x + e\right )} \sqrt {-\frac {g}{a}} + 3 \, g \cos \left (f x + e\right )^{2} - 18 \, g \cos \left (f x + e\right ) + {\left (17 \, g \cos \left (f x + e\right )^{2} + 14 \, g \cos \left (f x + e\right ) - 4 \, g\right )} \sin \left (f x + e\right ) - 4 \, g}{\cos \left (f x + e\right )^{3} + 3 \, \cos \left (f x + e\right )^{2} + {\left (\cos \left (f x + e\right )^{2} - 2 \, \cos \left (f x + e\right ) - 4\right )} \sin \left (f x + e\right ) - 2 \, \cos \left (f x + e\right ) - 4}\right ) + 8 \, \sqrt {a \sin \left (f x + e\right ) + a} \sqrt {g \sin \left (f x + e\right )}}{8 \, a c f \cos \left (f x + e\right )}, -\frac {\sqrt {2} a \sqrt {\frac {g}{a}} \arctan \left (\frac {\sqrt {2} \sqrt {a \sin \left (f x + e\right ) + a} \sqrt {g \sin \left (f x + e\right )} \sqrt {\frac {g}{a}} {\left (3 \, \sin \left (f x + e\right ) - 1\right )}}{4 \, g \cos \left (f x + e\right ) \sin \left (f x + e\right )}\right ) \cos \left (f x + e\right ) - 4 \, \sqrt {a \sin \left (f x + e\right ) + a} \sqrt {g \sin \left (f x + e\right )}}{4 \, a c f \cos \left (f x + e\right )}\right ] \]

input
integrate((g*sin(f*x+e))^(1/2)/(c-c*sin(f*x+e))/(a+a*sin(f*x+e))^(1/2),x, 
algorithm="fricas")
 
output
[1/8*(sqrt(2)*a*sqrt(-g/a)*cos(f*x + e)*log((17*g*cos(f*x + e)^3 + 4*sqrt( 
2)*(3*cos(f*x + e)^2 + (3*cos(f*x + e) + 4)*sin(f*x + e) - cos(f*x + e) - 
4)*sqrt(a*sin(f*x + e) + a)*sqrt(g*sin(f*x + e))*sqrt(-g/a) + 3*g*cos(f*x 
+ e)^2 - 18*g*cos(f*x + e) + (17*g*cos(f*x + e)^2 + 14*g*cos(f*x + e) - 4* 
g)*sin(f*x + e) - 4*g)/(cos(f*x + e)^3 + 3*cos(f*x + e)^2 + (cos(f*x + e)^ 
2 - 2*cos(f*x + e) - 4)*sin(f*x + e) - 2*cos(f*x + e) - 4)) + 8*sqrt(a*sin 
(f*x + e) + a)*sqrt(g*sin(f*x + e)))/(a*c*f*cos(f*x + e)), -1/4*(sqrt(2)*a 
*sqrt(g/a)*arctan(1/4*sqrt(2)*sqrt(a*sin(f*x + e) + a)*sqrt(g*sin(f*x + e) 
)*sqrt(g/a)*(3*sin(f*x + e) - 1)/(g*cos(f*x + e)*sin(f*x + e)))*cos(f*x + 
e) - 4*sqrt(a*sin(f*x + e) + a)*sqrt(g*sin(f*x + e)))/(a*c*f*cos(f*x + e)) 
]
 
3.1.17.6 Sympy [F]

\[ \int \frac {\sqrt {g \sin (e+f x)}}{\sqrt {a+a \sin (e+f x)} (c-c \sin (e+f x))} \, dx=- \frac {\int \frac {\sqrt {g \sin {\left (e + f x \right )}}}{\sqrt {a \sin {\left (e + f x \right )} + a} \sin {\left (e + f x \right )} - \sqrt {a \sin {\left (e + f x \right )} + a}}\, dx}{c} \]

input
integrate((g*sin(f*x+e))**(1/2)/(c-c*sin(f*x+e))/(a+a*sin(f*x+e))**(1/2),x 
)
 
output
-Integral(sqrt(g*sin(e + f*x))/(sqrt(a*sin(e + f*x) + a)*sin(e + f*x) - sq 
rt(a*sin(e + f*x) + a)), x)/c
 
3.1.17.7 Maxima [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 270 vs. \(2 (96) = 192\).

Time = 0.32 (sec) , antiderivative size = 270, normalized size of antiderivative = 2.37 \[ \int \frac {\sqrt {g \sin (e+f x)}}{\sqrt {a+a \sin (e+f x)} (c-c \sin (e+f x))} \, dx=\frac {\frac {4 \, \sqrt {2} \sqrt {g} \left (\frac {\sin \left (f x + e\right )}{\cos \left (f x + e\right ) + 1}\right )^{\frac {3}{2}}}{\sqrt {a} c + \frac {\sqrt {a} c \sin \left (f x + e\right )}{\cos \left (f x + e\right ) + 1} - \frac {{\left (\sqrt {a} c + \frac {\sqrt {a} c \sin \left (f x + e\right )}{\cos \left (f x + e\right ) + 1}\right )} \sin \left (f x + e\right )}{\cos \left (f x + e\right ) + 1}} - \frac {2 \, \sqrt {2} \sqrt {g} \arctan \left (\sqrt {\frac {\sin \left (f x + e\right )}{\cos \left (f x + e\right ) + 1}}\right )}{\sqrt {a} c} + \frac {\sqrt {2} \sqrt {g} \sqrt {\frac {\sin \left (f x + e\right )}{\cos \left (f x + e\right ) + 1}} + \sqrt {2} \sqrt {g}}{\sqrt {a} c + \frac {\sqrt {a} c \sin \left (f x + e\right )}{\cos \left (f x + e\right ) + 1}} + \frac {\sqrt {2} \sqrt {g} \sqrt {\frac {\sin \left (f x + e\right )}{\cos \left (f x + e\right ) + 1}} - \sqrt {2} \sqrt {g}}{\sqrt {a} c + \frac {\sqrt {a} c \sin \left (f x + e\right )}{\cos \left (f x + e\right ) + 1}}}{2 \, f} \]

input
integrate((g*sin(f*x+e))^(1/2)/(c-c*sin(f*x+e))/(a+a*sin(f*x+e))^(1/2),x, 
algorithm="maxima")
 
output
1/2*(4*sqrt(2)*sqrt(g)*(sin(f*x + e)/(cos(f*x + e) + 1))^(3/2)/(sqrt(a)*c 
+ sqrt(a)*c*sin(f*x + e)/(cos(f*x + e) + 1) - (sqrt(a)*c + sqrt(a)*c*sin(f 
*x + e)/(cos(f*x + e) + 1))*sin(f*x + e)/(cos(f*x + e) + 1)) - 2*sqrt(2)*s 
qrt(g)*arctan(sqrt(sin(f*x + e)/(cos(f*x + e) + 1)))/(sqrt(a)*c) + (sqrt(2 
)*sqrt(g)*sqrt(sin(f*x + e)/(cos(f*x + e) + 1)) + sqrt(2)*sqrt(g))/(sqrt(a 
)*c + sqrt(a)*c*sin(f*x + e)/(cos(f*x + e) + 1)) + (sqrt(2)*sqrt(g)*sqrt(s 
in(f*x + e)/(cos(f*x + e) + 1)) - sqrt(2)*sqrt(g))/(sqrt(a)*c + sqrt(a)*c* 
sin(f*x + e)/(cos(f*x + e) + 1)))/f
 
3.1.17.8 Giac [F(-1)]

Timed out. \[ \int \frac {\sqrt {g \sin (e+f x)}}{\sqrt {a+a \sin (e+f x)} (c-c \sin (e+f x))} \, dx=\text {Timed out} \]

input
integrate((g*sin(f*x+e))^(1/2)/(c-c*sin(f*x+e))/(a+a*sin(f*x+e))^(1/2),x, 
algorithm="giac")
 
output
Timed out
 
3.1.17.9 Mupad [F(-1)]

Timed out. \[ \int \frac {\sqrt {g \sin (e+f x)}}{\sqrt {a+a \sin (e+f x)} (c-c \sin (e+f x))} \, dx=\int \frac {\sqrt {g\,\sin \left (e+f\,x\right )}}{\sqrt {a+a\,\sin \left (e+f\,x\right )}\,\left (c-c\,\sin \left (e+f\,x\right )\right )} \,d x \]

input
int((g*sin(e + f*x))^(1/2)/((a + a*sin(e + f*x))^(1/2)*(c - c*sin(e + f*x) 
)),x)
 
output
int((g*sin(e + f*x))^(1/2)/((a + a*sin(e + f*x))^(1/2)*(c - c*sin(e + f*x) 
)), x)